@use "theme/globals" as *;

:host {
    --list-item-max-width: 600px;
}

.core-login-site-connect {
    margin-top: 1.4rem;
}

.item ion-thumbnail {
    min-width: 50px;
    min-height: 50px;
    width: 50px;
    height: 50px;
    border-radius: 20%;
    box-shadow: 0 0 4px var(--gray-200);
    text-align: center;
    overflow: hidden;

    img {
        max-height: 50px;
        max-width: fit-content;
        width: auto;
        height: auto;
        margin: 0 auto;
        margin-left: 50%;
        object-fit: cover;
        object-position: 50% 50%;
        @include transform(translate3d(-50%,0,0));
    }
    ion-icon {
        margin: 0 auto;
        font-size: #{dynamic-font(35px)};
        height: 50px;
    }
}

:host-context([dir="rtl"]) {

    .item ion-thumbnail img {
        margin-left: 0;
        margin-right: 50%;
    }

}

.core-login-site-logo,
.core-login-site-list,
.core-login-site-list-found {
    visibility: visible;
    opacity: 1;
    transition: all 0.7s ease-in-out;
    max-height: 9999px;

    &.hidden {
        opacity: 0;
        visibility: hidden;
        margin-top: 0;
        margin-bottom: 0;
        padding: 0;
        max-height: 0;
        display: block !important; /** Avoid breaking the animation */
    }
}

.core-login-site-list-found.dimmed {
    pointer-events: none;
    position: relative;
}

.core-login-site-list-loading {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-content: center;
    align-items: center;
    background-color: rgb(255 255 255 / 50%);
    z-index: 1;
    ion-spinner {
        margin: 0 auto;
    }
}

.core-login-site-nolist-loading {
    margin-top: 16px;
    text-align: center;
}

.item.core-login-site-list-title {
    ion-label, ion-label h2.item-heading {
        margin-top: 0;
    }
}

@include media-breakpoint-up(md) {
    ion-content .core-login-site-logo {
        margin-top: 20%;
        &.hidden {
            margin-top: 0;
        }
    }
}

.core-login-entered-site {
    background-color: var(--light);

    ion-thumbnail {
        box-shadow: 0 0 4px var(--gray-300);
    }
}

.core-login-default-icon {
    filter: grayscale(100%);
}
